<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ID찾기</title>

<script type="text/javascript" src="/must_go/script/membershipScript/joinScript.js"></script>
<script type="text/javascript" src="/must_go/script/jquery.js"></script>

</head>
<body>
<h2>아이디 찾기</h2>
<form name="form" method="post" action="/must_go/membership/findId.do">
		<tr>
			<td>이름 입렵</td>
			<td>
				<!-- <input type="text" name="id" id="id" onkeyup="checkEng()" onblur="checkId()"> -->
				<input type="text" name=" name" id="name" onkeyup="checkId()" onblur="checkEng()">
			</td>
		</tr>
		<tr>
			<td colspan="2" id="id_error" style="color: red;"></td>
		</tr>
		
		<tr>
			<td>이메일 입력</td>
			<td>
				<input type="hidden" id="email" name="email">
				
				<input  type="text" class="form-control2" name="email1"
						id="email1" onkeyup="emailCheck()" onfocus="emailmsgclear()"> @ <input type="text"
						name="email2" id="email2" onkeyup="emailCheck2()"
						style="width: 80px; height: 20px; border-radius: 4px; border: 1px solid #ccc;" disabled value="naver.com"> 
						<select style="width: 100px; height: 20px" name="selectEmail" id="selectEmail">
						<option value="1">직접입력</option>
						<option value="naver.com" selected>naver.com</option>
						<option value="hanmail.net">hanmail.net</option>
						<option value="hotmail.com">hotmail.com</option>
						<option value="nate.com">nate.com</option>
						<option value="yahoo.co.kr">yahoo.co.kr</option>
						<option value="empas.com">empas.com</option>
						<option value="dreamwiz.com">dreamwiz.com</option>
						<option value="freechal.com">freechal.com</option>
						<option value="lycos.co.kr">lycos.co.kr</option>
						<option value="korea.com">korea.com</option>
						<option value="gmail.com">gmail.com</option>
						<option value="hanmir.com">hanmir.com</option>
						<option value="paran.com">paran.com</option>
					</select>
					<script type="text/javascript">
					//이메일 입력방식 선택
					$('#selectEmail').change(function() {
						$("#selectEmail option:selected").each(function() {
					
							if ($(this).val() == '1') { //직접입력일 경우
								$("#email2").val(''); //값 초기화
								$("#email2").attr("disabled", false); //활성화
							} else { //직접입력이 아닐경우
								$("#email2").val($(this).text()); //선택값 입력
								$("#email2").attr("disabled", true); //비활성화
							}
						});
					});
					</script>
			</td>
		</tr>
		<tr>
			<td id="email_error" style="color: red;"></td>
		</tr>
		
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="ID찾기">
				<input type="reset" value="다시작성">
			</td>
		</tr>
</form>
</body>
</html>